Consider a system with `m` resources of the same type being shared by ...
Introduction:
In a system with `m` resources of the same type being shared by `n` processes, deadlock can occur when processes indefinitely wait for resources held by other processes. To ensure the system is deadlock-free, certain conditions need to be met. The given question asks about the condition for a deadlock-free system based on the sum of the maximum need.
Explanation:
To understand the condition for a deadlock-free system, let's consider the scenario where each process has a maximum need for resources.
If the sum of the maximum need is greater than m:
If the sum of the maximum need for all processes is greater than the total available resources `m`, it indicates that the total demand for resources exceeds the system's capacity. In such a scenario, the system may face resource exhaustion, leading to a potential deadlock. This condition does not ensure a deadlock-free system.
If the sum of the maximum need is less than m:
If the sum of the maximum need for all processes is less than the total available resources `m`, it guarantees that the system has sufficient resources to fulfill the maximum need of each process. In this case, the system can allocate resources to all processes without any deadlock. This condition ensures a deadlock-free system.
Conclusion:
Based on the explanation above, it can be concluded that the system is deadlock-free if and only if the sum of the maximum need for all processes is less than the total available resources `m`. Therefore, option 'B' is the correct answer.
Consider a system with `m` resources of the same type being shared by ...
Suppose N = ∑ all Needsi, A = ∑ all Allocationsi, M = ∑ all maximum Needsi.
Assume that there is no deadlock in the given system. If there is a deadlock state, then A = m because there is only one kind of resource and it can either be requested or released at a time.
From the condition 1 and 2 we get, N + A = M < m + n. So, we get N < n. It shows that at least one process i that Needs = 0. From condition 1, one process can release at least 1 resource. Thus, there are n -1 processes sharing m resources. It is always true that no process will wait permanently. Hence, the given system is deadlock free.